#ifndef TOUCHPAD_MONITOR_H
#define TOUCHPAD_MONITOR_H

#include <iostream>
#include <Windows.h>
#include <hidsdi.h>
#include <hidusage.h>

namespace TouchpadUtils {

LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);


// 触摸板监控
class TouchpadMonitor
{
public:
	static TouchpadMonitor* GetInstance();
	bool Init();
	void UnInit();

	HWND Create(WNDPROC wndProc);
	bool RegisterWndClass(WNDPROC wndProc);
	bool UnRegisterWndClass() const;

	bool RegisterTouchpadInput() const;

	void HandleRawInput(WPARAM* wParam, LPARAM* lParam);

private:
	TouchpadMonitor();
	~TouchpadMonitor();

private:
	HWND hWnd = nullptr;
};
}

#endif	// !TOUCHPAD_MONITOR_H